import { request } from '../utils/request.js'

// 新增收货地址
export const operateAddressService = (data) =>
  request({ url: '/address/operateAddress', method: 'POST', data })

// 获取收货地址
export const getAddressService = (userId) =>
  request({ url: `/address/getAddress/${userId}` })

// 删除收货地址
export const delAddressService = (id) =>
  request({ url: `/address/deleteAddress/${id}`, method: 'DELETE' })

// 搜索收货地址
export const findAddressService = (query) =>
  request({ url: '/address/findAddress', query })
